 import {
     HTTP_GET,
     HTTP_POST,
     HTTP_PUT
 } from '../../http/lib/index.js'
 export const WorkOrderReviewApi = {
     // 分页查询由我审核工单列表
     getList: (params, cb) => HTTP_POST('/wechat/workOrderReview/pageList', params, cb),
     // 工单通过
     pass: (params, cb) => HTTP_POST('/wechat/workOrderReview/pass', params, cb),
     // 工单驳回
     reject: (params, cb) => HTTP_POST('/wechat/workOrderReview/reject', params, cb),

 }


 /**
  *我的工单
  */
 export const WorkOrderMyIndexApi = {
     /**
      *获取列表数据
      * @param {*} params 
      * @param {*} cb 
      */
     getlist: (params, cb) => HTTP_POST('/wechat/workOrder/listWeChatOrder', params, cb),
     /**
      * 接单
      */
     acceptOrder: (params, cb) => HTTP_PUT('/wechat/workOrder/receive', params, cb),
     /**
      * 终止
      */
     termination: (params, cb) => HTTP_PUT('/wechat/workOrder/termination', params, cb),
     /**
      * 撤销审核
      */
     revokeReview: (params, cb) => HTTP_PUT('/wechat/workOrder/revokeReview', params, cb),
     /**
      * 评价
      */
     evaluate: (params, cb) => HTTP_POST('/wechat/workOrder/evaluate', params, cb),
     /**
      * 退单
      */
     chargeback: (params, cb) => HTTP_PUT('/wechat/workOrder/reback', params, cb),
     /**
      * 处理工单
      */
     handleWorkOrder: (params, cb) => HTTP_PUT('/wechat/workOrder/make', params, cb),
     /**
      * 转单
      */
     transferOrder: (params, cb) => HTTP_PUT('/wechat/workOrder/redirect', params, cb),
     /**
      * 协作工单
      */
     collaborativeWorkOrder: (params, cb) => HTTP_PUT('/wechat/workOrder/assist', params, cb),
     /**
      * 升级工单
      */
     upgrade: (params, cb) => HTTP_PUT('/wechat/workOrder/upgrade', params, cb),
     /**
      * 重启工单
      */
     restart: (params, cb) => HTTP_PUT('/wechat/workOrder/restart', params, cb),
     /**
      * 开启工单
      * @param {*} params 
      * @param {*} cb 
      */
     open: (params, cb) => HTTP_PUT('/wechat/workOrder/open', params, cb),
     /**
      * 完成工单
      */
     complete: (params, cb) => HTTP_PUT('/wechat/workOrder/complete', params, cb),
     /**
      * 暂停
      */
     pause: (params, cb) => HTTP_PUT('/wechat/workOrder/suspend', params, cb),


 }

 /**
  * 工单查询
  */
 export const WorkOrderSearchApi = {
     getList: (params, cb) => HTTP_POST('/wechat/workOrderQuery/pageList', params, cb)
 }

 /**
  * 工单详情
  */
 export const WorkOrderApi = {
     getDetail: (orderNum, cb) => HTTP_GET(`/wechat/workOrderQuery/getInfoByOrderNum`, {
         orderNum
     }, cb)
 }